home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / PVDRIVER / NTMITSUM.ZIP / OEMSETUP.INF < prev    next >
INI File  |  1993-08-16  |  19KB  |  577 lines

  1. ;-----------------------------------------------------------------------
  2. ; OPTION TYPE
  3. ; -----------
  4. ; This identifies the Option type we are dealing with.  The different
  5. ; possible types are:
  6. ;
  7. ; COMPUTER, VIDEO, POINTER, KEYBOARD, LAYOUT, SCSI, TAPE, PRINTER, ...
  8. ;-----------------------------------------------------------------------
  9.  
  10. [Identification]
  11.     OptionType = SCSI
  12.  
  13. ;-----------------------------------------------------------------------
  14. ; LANGUAGES SUPPORTED
  15. ; -------------------
  16. ;
  17. ; The languages supported by the INF, For every language supported
  18. ; we need to have a separate text section for every displayable text
  19. ; section.
  20. ;
  21. ;-----------------------------------------------------------------------
  22.  
  23. [LanguagesSupported]
  24.     ENG
  25.  
  26.  
  27. ;-----------------------------------------------------------------------
  28. ; OPTION LIST
  29. ; -----------
  30. ; This section lists the Option key names.  These keys are locale
  31. ; independent and used to represent the option in a locale independent
  32. ; manner.
  33. ;
  34. ;-----------------------------------------------------------------------
  35.  
  36. [Options]
  37.     "BUSCD"    = BusCd
  38.  
  39. ;-----------------------------------------------------------------------
  40. ; OPTION TEXT SECTION
  41. ; -------------------
  42. ; These are text strings used to identify the option to the user.  There
  43. ; are separate sections for each language supported.  The format of the
  44. ; section name is "OptionsText" concatenated with the Language represented
  45. ; by the section.
  46. ;
  47. ;-----------------------------------------------------------------------
  48.  
  49. [OptionsTextENG]
  50.     "BUSCD"    = "CD-ROM Driver for Internal CD"
  51.  
  52.  
  53. ;-----------------------------------------------------------------------------------------
  54. ; SCSI MINIPORT DRIVERS:
  55. ;
  56. ; Order of the information:
  57. ;
  58. ; Class driver = Type, Group, ErrorControl, Tag, EventMessageFile, TypesSupported
  59. ;
  60. ;-----------------------------------------------------------------------------------------
  61.  
  62. [MiniportDrivers]
  63.     BusCd  = !SERVICE_KERNEL_DRIVER, "SCSI CDROM Class", !SERVICE_ERROR_NORMAL,  0, %SystemRoot%\System32\IoLogMsg.dll , 7
  64.  
  65. ;---------------------------------------------------------------------------
  66. ; 1. Identify
  67. ;
  68. ; DESCRIPTION:   To verify that this INF deals with the same type of options
  69. ;                as we are choosing currently.
  70. ;
  71. ; INPUT:         None
  72. ;
  73. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL
  74. ;                $($R1): Option Type (COMPUTER ...)
  75. ;                $($R2): Diskette description
  76. ;---------------------------------------------------------------------------
  77.  
  78. [Identify]
  79.     ;
  80.     ;
  81.     read-syms Identification
  82.  
  83.     set Status     = STATUS_SUCCESSFUL
  84.     set Identifier = $(OptionType)
  85.     set Media      = #("Source Media Descriptions", 1, 1)
  86.  
  87.     Return $(Status) $(Identifier) $(Media)
  88.  
  89.  
  90.  
  91. ;------------------------------------------------------------------------
  92. ; 2. ReturnOptions:
  93. ;
  94. ; DESCRIPTION:   To return the option list supported by this INF and the
  95. ;                localised text list representing the options.
  96. ;
  97. ;
  98. ; INPUT:         $($0):  Language used. ( ENG | FRN | ... )
  99. ;
  100. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL |
  101. ;                                STATUS_NOLANGUAGE
  102. ;                                STATUS_FAILED
  103. ;
  104. ;                $($R1): Option List
  105. ;                $($R2): Option Text List
  106. ;------------------------------------------------------------------------
  107.  
  108. [ReturnOptions]
  109.     ;
  110.     ;
  111.     set Status        = STATUS_FAILED
  112.     set OptionList     = {}
  113.     set OptionTextList = {}
  114.  
  115.     ;
  116.     ; Check if the language requested is supported
  117.     ;
  118.     set LanguageList = ^(LanguagesSupported, 1)
  119.     Ifcontains(i) $($0) in $(LanguageList)
  120.         goto returnoptions
  121.     else
  122.         set Status = STATUS_NOLANGUAGE
  123.         goto finish_ReturnOptions
  124.     endif
  125.  
  126.     ;
  127.     ; form a list of all the options and another of the text representing
  128.     ;
  129.  
  130. returnoptions = +
  131.     set OptionList     = ^(Options, 0)
  132.     set OptionTextList = ^(OptionsText$($0), 1)
  133.     set Status         = STATUS_SUCCESSFUL
  134.  
  135. finish_ReturnOptions = +
  136.     Return $(Status) $(OptionList) $(OptionTextList)
  137.  
  138.  
  139. ;
  140. ; 3. InstallOption:
  141. ;
  142. ; FUNCTION:  To copy files representing Options
  143. ;            To configure the installed option
  144. ;            To update the registry for the installed option
  145. ;
  146. ; INPUT:     $($0):  Language to use
  147. ;            $($1):  OptionID to install
  148. ;            $($2):  SourceDirectory
  149. ;            $($3):  AddCopy  (YES | NO)
  150. ;            $($4):  DoCopy   (YES | NO)
  151. ;            $($5):  DoConfig (YES | NO)
  152. ;
  153. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  154. ;                            STATUS_NOLANGUAGE |
  155. ;                            STATUS_USERCANCEL |
  156. ;                            STATUS_FAILED
  157. ;
  158.  
  159. [InstallOption]
  160.  
  161.     ;
  162.     ; Set default values for
  163.     ;
  164.     set Status = STATUS_FAILED
  165.     set DrivesToFree = {}
  166.  
  167.     ;
  168.     ; extract parameters
  169.     ;
  170.     set Option   = $($1)
  171.     set SrcDir   = $($2)
  172.     set AddCopy  = $($3)
  173.     set DoCopy   = $($4)
  174.     set DoConfig = $($5)
  175.  
  176.     ;
  177.     ; Check if the language requested is supported
  178.     ;
  179.     set LanguageList = ^(LanguagesSupported, 1)
  180.     Ifcontains(i) $($0) in $(LanguageList)
  181.     else
  182.         set Status = STATUS_NOLANGUAGE
  183.         goto finish_InstallOption
  184.     endif
  185.     read-syms Strings$($0)
  186.  
  187.     ;
  188.     ; check to see if Option is supported.
  189.     ;
  190.  
  191.     set OptionList = ^(Options, 0)
  192.     ifcontains $(Option) in $(OptionList)
  193.     else
  194.         Debug-Output "SCSI.INF: SCSI option is not supported."
  195.         goto finish_InstallOption
  196.     endif
  197.     set OptionList = ""
  198.  
  199.     ;
  200.     ; Option has been defined already
  201.     ;
  202.  
  203.     set MiniportDriver   =   #(Options,         $(Option),         1)
  204.     set Type             = $(#(MiniportDrivers, $(MiniportDriver), 1))
  205.     set Group            =   #(MiniportDrivers, $(MiniportDriver), 2)
  206.     set ErrorControl     = $(#(MiniportDrivers, $(MiniportDriver), 3))
  207.     set Tag              =   #(MiniportDrivers, $(MiniportDriver), 4)
  208.     set EventMessageFile =   #(MiniportDrivers, $(MiniportDriver), 5)
  209.     set TypesSupported   =   #(MiniportDrivers, $(MiniportDriver), 6)
  210.  
  211.     set Start            =   $(!SERVICE_SYSTEM_START)
  212.     shell "registry.inf" GetServicesEntryStart $(MiniportDriver)
  213.     ifint $($ShellCode) == $(!SHELL_CODE_OK)
  214.         ifstr(i) $($R0) == "STATUS_SUCCESSFUL"
  215.             ifstr(i) $($R1) == $(!SERVICE_BOOT_START)
  216.                 set Start = $(!SERVICE_BOOT_START)
  217.             endif
  218.         endif
  219.     endif
  220.  
  221. installtheoption = +
  222.  
  223.     ;
  224.     ; Code to add files to copy list
  225.     ;
  226.  
  227.     ifstr(i) $(AddCopy) == "YES"
  228.         set DoActualCopy = NO
  229.         set FileToCheck = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  230.         LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\drivers\"$(FileToCheck)
  231.         ifstr(i) $(STATUS) == NO
  232.             set DoActualCopy = YES
  233.         endif
  234.  
  235.         ifstr(i) $(DoActualCopy) == NO
  236.             shell "subroutn.inf" DriversExist $($0) $(String1)
  237.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  238.                 Debug-Output "SCSI.INF: shelling DriversExist failed"
  239.                 goto finish_InstallOption
  240.             endif
  241.  
  242.             ifstr(i) $($R0) == STATUS_CURRENT
  243.             else-ifstr(i) $($R0) == STATUS_NEW
  244.                 set DoActualCopy = YES
  245.             else-ifstr(i) $($R0) == STATUS_USERCANCEL
  246.                 Debug-Output "SCSI.INF: User cancelled SCSI installation"
  247.                 goto finish_InstallOption
  248.             else
  249.                 Debug-Output "SCSI.INF: Error reported in DriversExist routine in SUBROUTN.INF"
  250.                 goto finish_InstallOption
  251.             endif
  252.         endif
  253.  
  254.         ifstr(i) $(DoActualCopy) == YES
  255.  
  256.             shell "subroutn.inf" DoAskSourceEx $(SrcDir) $(String2)
  257.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  258.                 Debug-Output "SCSI.INF: shelling DoAskSourceEx failed"
  259.                 goto finish_InstallOption
  260.             endif
  261.  
  262.